package com.vastcom.tyauthcenter.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Rolegroup {
    private String rolegroupid;
    private String name;

    @Id
    @Column(name = "rolegroupid")
    public String getRolegroupid() {
        return rolegroupid;
    }

    public void setRolegroupid(String rolegroupid) {
        this.rolegroupid = rolegroupid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Rolegroup rolegroup = (Rolegroup) o;

        if (rolegroupid != null ? !rolegroupid.equals(rolegroup.rolegroupid) : rolegroup.rolegroupid != null)
            return false;
        if (name != null ? !name.equals(rolegroup.name) : rolegroup.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = rolegroupid != null ? rolegroupid.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }
}
